<?php

class FrmLinkToTerminal {
    private $setter;
    private $divContent;
    private $linkToTerminal;
    
    public function __construct($userNick="nickName",$userPass="passEnc", $sections=array()) {
        $this->setter=new Setter("../Config");
        
        $secs="";
        foreach ($sections as $sec){
            $secs.=$sec."_";
        }
        $sectionsFinal=substr($secs, 0,  strlen($secs)-1);
        $this->divContent=new Div($name="divContent", $id="divContent", $class="containerAccess", $events=array(),$height="",$width="",$top="",$left="", $visibility="");
        $this->linkToTerminal=new Link($name="linkToterminal", $id="linkToterminal", $href="../Events/EventsFrmTerminal.php?start=yes&nick=".$userNick."&password=".$userPass."&sections=".$sectionsFinal,$target="", $title="Terminal", $specialWindow="no", $windowWidth="500", $windowHeight="500", $top="0", $left="0", $toolbar="0",$location="0",$directories="0",$status="0",$menubar="0",$scrollbars="2",$resizable="2",$linkText="", $linkImage="../Themes/".$this->setter->getTheme()."/Images/terminal.png", $class="", $events=array());
    }
    
    public function setVisible($visible=TRUE){
        if($visible==TRUE){
            $this->divContent->start();
                $this->linkToTerminal->show();
            $this->divContent->end();
        }
    }
}

?>
